package com.tengju.bff.interfaces.covercharge.constant;


public enum PaymentSystemAgreedChannelStateEnum {

    FAILURE("failed","失败"),
    PROCESS("process","交易中"),
    SUCCESS("success","成功"),
    UNKNOW("unknow","未知"),
    ;

    private String code;
    private String desc;

    PaymentSystemAgreedChannelStateEnum(String code, String desc){
        this.code=code;
        this.desc=desc;
    }
    public String getCode(){
        return this.code;
    }
    public String getDesc(){
        return this.desc;
    }

    public static PaymentSystemAgreedChannelStateEnum getByCode (String code){
        for(PaymentSystemAgreedChannelStateEnum accountTypeEnum : (PaymentSystemAgreedChannelStateEnum.values())){
            if(accountTypeEnum.getCode().equals(code)){
                return accountTypeEnum;
            }
        }
        return null;
    }
}
